import request from '@/utils/request.js'
import qs from 'qs';

/*****单卡导入******/
export function oneCardImport(data){
    return request({
        url: 'sim/import/one',
        method: 'post',
        // headers: { 'content-type': 'application/x-www-form-urlencoded' },
        data: qs.stringify(data)
    })
}
/***卡片导入列表***/
export function getImportRecordList(data){
    return request({
        url: 'sim/import/list',
        method: 'post',
        data
    })
}
export function getImportRecordListSold(data){
    return request({
        url: 'sim/unSold/import/list',
        method: 'post',
        data
    })
}
export function getImportRecordList1(data){
    return request({
        url: 'sim/other/batch/select/sim/list',
        method: 'post',
        data
    })
}
export function getImportRecordList5(data){
    return request({
        url: 'sim/other/batch/select/state/list',
        method: 'post',
        data
    })
}
export function getImportRecordList3(data){
    return request({
        url: 'sim/other/batch/select/data/list',
        method: 'post',
        data
    })
}
export function getImportRecordList2(data){
    return request({
        url: 'sim/other/batch/select/sim/iccid',
        method: 'get',
        data
    })
}
/***卡片导入失败列表***/
export function getImportFailRecordList(data){
    return request({
        url: 'sim/import/fail/list',
        method: 'post',
        data
    })
}
export function getImportFailRecordListSold(data){
    return request({
        url: 'sim/unSold/import/fail/list',
        method: 'post',
        data
    })
}
/***卡片管理列表***/
export function getAdminCardList(data){
    return request({
        url: 'sim/admin/list',
        method: 'post',
        data
    })
}
export function getAdminCardList5(data){
    return request({
        url: 'sim/admin/list/voice',
        method: 'post',
        data
    })
}
/***平台获取套餐列表***/
export function getPkgList(data) {
    return request({
        url: 'pkg/add/list',
        method: 'get',
        params: data
    })
}
/***平台添加套餐***/
export function addPkg(data) {
    return request({
        url: 'add/pkg',
        method: 'post',
        data
    })
}
/**
 * 
 *语音套餐列表
 */
export function getAdminCardList1(data){
    return request({
        url: 'simSupplier/voice/list',
        method: 'post',
        data
    })
}
/**
 * 
 * 查看白名单设置
 */
export function getAdminCardList2(data){
    return request({
        url: 'simSupplier/select/number/group/voice',
        method: 'post',
        data
    })
}
/**** 增加白名单 */
export function getAdminCardList3(data){
    return request({
        url: 'simSupplier/update/number/group/voice',
        method: 'post',
        data
    })
}
/***卡片列表的列表***/
export function getAgentCardList(data){
    return request({
        url: 'sim/agent/list',
        method: 'post',
        data
    })
}
export function getAgentCardList1(data){
    return request({
        url: 'sim/agent/list/voice',
        method: 'post',
        data
    })
}
/***卡片详情***/
export function getSimDetailInfo(data){
    return request({
        url: 'sim/detail',
        method: 'post',
        data
    })
}
/***卡片详情页编辑备注***/
export function setRemark(data){
    return request({
        url: 'sim/update/remark',
        method: 'post',
        data
    })
}
/***分销记录***/
export function getSimDistributRecord(data){
    return request({
        url: 'sim/sold/list',
        method: 'post',
        data
    })
}
/***分销记录***/
export function getSimDistributRecord1(data){
    return request({
        url: 'agent/stop/sim/data',
        method: 'post',
        data
    })
}
/***SIM卡分销失败记录***/
export function getSimDistributFailRecordList(data){
    return request({
        url: 'sim/sold/info',
        method: 'post',
        data
    })
}
/***到期SIM卡管理列表***/
export function getAdminExpireSimList(data){
    return request({
        url: 'sim/admin/expire',
        method: 'post',
        data
    })
}
/***到期SIM卡管理列表***/
export function getAgentExpireSimList(data){
    return request({
        url: 'sim/agent/expire',
        method: 'post',
        data
    })
}
/***更新SIM状态***/
export function updateSimState(data){
    return request({
        url: 'cmcc/oneButton/update',
        method: 'post',
        data
    })
}
/***保号停机***/
export function stopSim(data){
    return request({
        url: 'cmcc/sim/pause',
        method: 'post',
        data
    })
}
/**关通信服务 */
export function stopSim1(data){
    return request({
        url: 'sim/active/pause/voice',
        method: 'post',
        data
    })
}
/***开通信服务 */
export function stopSim2(data){
    return request({
        url: 'sim/active/pause/voice',
        method: 'post',
        data
    })
}
/***保号复机***/
export function resetSim(data){
    return request({
        url: 'cmcc/sim/active',
        method: 'post',
        data
    })
}
/***卡片详情添加备注***/
export function addRemark(data){
    return request({
        url: 'sim/update/remark',
        method: 'post',
        data
    })
}


/***删除卡片***/
export function deleteCard(data){
    return request({
        url: 'sim/delete/sim',
        method: 'post',
        data
    })
}

/** 查询IMEI号 */
export function getImei(data) {
    return request({
        url: 'cmcc/sim/imei',
        method: 'post',
        data
    })
}

